home *** CD-ROM | disk | FTP | other *** search
- Path: news.lpr.carel.fi!usenet
- From: Ari Lukumies <aril@cmt.lpr.mail.carel.fi>
- Newsgroups: comp.lang.c++
- Subject: Re: ODBC in Console Applicatoin ?
- Date: Fri, 02 Feb 1996 14:25:05 +0200
- Organization: Carelcomp Forest
- Message-ID: <311202A1.6F84@cmt.lpr.mail.carel.fi>
- References: <3110A77A.47EC@hobbe.adb.gu.se>
- NNTP-Posting-Host: renoir.cclahti.carel.fi
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b6a (WinNT; I)
-
- Peter Bohn wrote:
- >
- > Hello !!!
- >
- > I've created an application with the AppsWizard and linked a *.mdb file
- > to it. I used MFC to managed that. But the question is, can I get access
- > to a *.mdb file and use the MFC in a console application?
- >
-
- Actually, you don't _link_ the mdb file to your application (it's an external
- datafile); you use ODBC API calls like SQLDriverConnect etc. to connect to it from your
- code, SQLPrepare, SQLExecute etc. to execute SQL statments and the like. Or, using MFC,
- you use the classes CDatabase, CRecordSet etc. and communicate with the database with
- those.
-
- > My goal is to take variables from a WWW-page and put it in a Access
- > Database(*.mdb). But another problem is, there is no stdout in the
- > application AppsWizard created for me. I have to work with windows, and
- > therefore I must use a console application.
- >
- > Is this impossible ?
- >
- >
-
- I think, if you use ODBC API calls, that can be done. But if you use MFC (wrapper above
- ODBC API calls), you'll have to stick to GUI applications. If I remember correctly,
- MFC's CDatabase refuses to open a database (that mdb file) if there is no graphical
- parent window present.
-
- Later,
- AriL
- --
- All my opinions are mine and mine alone.
-